<!--# layout("/common/layout.html",{"jsBase":"/js/system/channelSet/"}){ -->

<form class="layui-form layui-form-pane" id="addForm"  lay-filter="editform">
    <div class="layui-row">
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">渠道代码</label>
                <div class="layui-input-inline">
                    <!--# if(isEmpty(channelSet)) { -->
                    <input type="text" name="channelCode" id="channelCode" autocomplete="off" class="layui-input" lay-verify="required">
                    <!--# } else { -->
                    <input type="hidden" name="channelCode" id="channelCode"/>
                    <span style="line-height:38px;margin-left:8px">
                        ${channelSet.channelCode}
                    </span>
                    <!--# } -->
                </div>
            </div>
            <div class="layui-inline">
            <label class="layui-form-label">渠道名称</label>
				<div class="layui-input-inline">
                                <input type="text" name="channelName" id="channelName" autocomplete="off" class="layui-input" lay-verify="required">
				</div>
            </div>
            <div class="layui-inline">
            <label class="layui-form-label">渠道类型</label>
				<div class="layui-input-inline">
					<layui:simpleDictSelect style='layui-input-inline' type="channel_type" layVerify=""
								id="channelType" name="channelType" value="" />
				</div>
            </div>
        </div>
    </div>

    <div class="layui-row">
        <div class="layui-form-item">
            <!--#if(accessType==6){ -->
            <div class="layui-inline">
            <label class="layui-form-label">归属</label>
				<div class="layui-input-inline">
                    <layui:simpleDataSelect name="orgId" value="${isNotEmpty(channelSet)?channelSet.orgId:}" data="${orgList}"
                                            attrId="id" attrName="name" laySearch="true"/>
				</div>
            </div>
            <!--# } -->
            <div class="layui-inline">
            <label class="layui-form-label">查分价格</label>
				<div class="layui-input-inline">
                                <input type="text" name="choicePrice" id="choicePrice" autocomplete="off" class="layui-input" lay-verify="required|number">
				</div>
            </div>
            <div class="layui-inline">
            <label class="layui-form-label" style="width: 120px">志愿填报VIP</label>
				<div class="layui-input-inline"  style="width: 220px">
                                <input type="text" name="appraisePrice" id="appraisePrice" autocomplete="off" class="layui-input" lay-verify="required|number">
				</div>
            </div>
        </div>
    </div>

    <div class="layui-row">
        <div class="layui-form-item">
            <div class="layui-inline">
            <label class="layui-form-label" style="width: 130px">霍兰德测试价格</label>
				<div class="layui-input-inline" style="width: 210px">
                                <input type="text" name="hollandPrice" id="hollandPrice" autocomplete="off" class="layui-input" lay-verify="required|number">
				</div>
            </div>
            <div class="layui-inline">
            <label class="layui-form-label" style="width: 120px">大学概率价格</label>
				<div class="layui-input-inline" style="width: 220px">
                                <input type="text" name="chancePrice" id="chancePrice" autocomplete="off" class="layui-input" lay-verify="required|number">
				</div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label" style="width: 120px">龙卡志愿价格</label>
                <div class="layui-input-inline" style="width: 220px">
                    <input type="text" name="dragoncardPrice" id="dragoncardPrice" autocomplete="off" class="layui-input" lay-verify="required|number">
                </div>
            </div>
        </div>
    </div>
    <div class="layui-row">
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label" style="width: 120px">自主招生价格</label>
                <div class="layui-input-inline" style="width: 220px">
                    <input type="text" name="atnmPrice" id="atnmPrice" autocomplete="off" class="layui-input" lay-verify="required|number">
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label" style="width: 110px">自荐信单价</label>
                <div class="layui-input-inline" style="width: 230px">
                    <input type="text" name="atnmStatementPrice" id="atnmStatementPrice" autocomplete="off" class="layui-input" lay-verify="required|number">
                </div>
            </div>
        </div>
    </div>
    <div class="layui-row">
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">客服电话</label>
                <div class="layui-input-inline">
                    <input type="text" name="jsonInfo['channelPhone']" id="channelPhone" value="${jsonInfo.channelPhone!}" autocomplete="off" class="layui-input" lay-verify="required">
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">机构名称</label>
                <div class="layui-input-inline">
                    <input type="text" name="jsonInfo['groupName']" id="groupName" value="${jsonInfo.groupName!}" autocomplete="off" class="layui-input" lay-verify="required">
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">渠道微信</label>
                <div class="layui-input-inline">
                    <input type="text" name="jsonInfo['channelWx']" id="channelWx" value="${jsonInfo.channelWx!}" autocomplete="off" class="layui-input" lay-verify="required">
                </div>
            </div>
        </div>
    </div>
    <layui:submitButtons id="addButton" />
</form>
<!--#} -->
<script>
layui.define([ 'form', 'laydate', 'table','channelSetApi'], function(exports) {
    var form = layui.form;
    var channelSetApi = layui.channelSetApi;
    var index = layui.index;
    var isNew = true;
    <!--# if(!(isEmpty(channelSetJson))){  -->
    isNew = false;
    <!--# } -->
    var view = {
        init:function(){
            Lib.initGenrealForm($("#addForm"),form);
            this.initSubmit();
        },
        initSubmit:function(){
            $("#addButton").click(function(){
                form.on('submit(form)', function(){
                    channelSetApi.saveForm(isNew,$('#addForm'),function(){
                        parent.window.dataReload();
                        Common.info("保存成功");
                        Lib.closeFrame();
                    });
                });
            });

            $("#addButton-cancel").click(function(){
                Lib.closeFrame();
            });
        }

    }
    view.init();
    <!--# if(!(isEmpty(channelSetJson))){  -->
    var formJson = ${channelSetJson};
    form.val("editform",formJson);
    <!--# } -->
});
</script>
